/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.ts.manager.impl;

import java.util.Collection;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xy.biz.ts.domain.bo.TrainFlowHandleBO;
import com.xy.biz.ts.domain.query.TrainFlowHandleQuery;
import com.xy.biz.ts.domain.converter.TrainFlowHandleConverter;
import com.xy.biz.ts.manager.TrainFlowHandleManager;
import com.xy.biz.ts.dao.TrainFlowHandleDao;

/**
 * 
 * 
 * @author zgy
 * @date 2021-6-28
 */
@Service
public class TrainFlowHandleManagerImpl implements TrainFlowHandleManager {

	@Autowired
	private TrainFlowHandleDao trainFlowHandleDao;
	
	@Override
	public int saveTrainFlowHandle(TrainFlowHandleBO trainFlowHandleBO) {
		return trainFlowHandleDao.saveTrainFlowHandle(TrainFlowHandleConverter.toPO(trainFlowHandleBO));
	}
	
	@Override
	public int saveAllTrainFlowHandle(Collection<TrainFlowHandleBO> collection) {
		return trainFlowHandleDao.saveAllTrainFlowHandle(TrainFlowHandleConverter.toPO(collection));
	}
	
	@Override
	public int updateTrainFlowHandle(TrainFlowHandleBO trainFlowHandleBO) {
		return trainFlowHandleDao.updateTrainFlowHandle(TrainFlowHandleConverter.toPO(trainFlowHandleBO));
	}
	
	@Override
	public int deleteTrainFlowHandle(Long trainFlowHandleId) {
		return trainFlowHandleDao.deleteTrainFlowHandle(trainFlowHandleId);
	}
	
	@Override
	public TrainFlowHandleBO getTrainFlowHandle(Long trainFlowHandleId) {
		return TrainFlowHandleConverter.fromPO(trainFlowHandleDao.getTrainFlowHandle(trainFlowHandleId));
	}
	
	@Override
	public List<TrainFlowHandleBO> listTrainFlowHandleById(Collection<Long> collection) {
		return TrainFlowHandleConverter.fromPO(trainFlowHandleDao.listTrainFlowHandleById(collection));
	}
	
	@Override
	public List<TrainFlowHandleBO> listTrainFlowHandle(TrainFlowHandleQuery query) {
		return TrainFlowHandleConverter.fromPO(trainFlowHandleDao.listTrainFlowHandle(query));
	}
	
	@Override
	public int countTrainFlowHandle(TrainFlowHandleQuery query) {
		return trainFlowHandleDao.countTrainFlowHandle(query);
	}
	
}
